// JavaScript Document

$(document).ready(function() {
  animateCanvas('stadium', stadeImage);
  animateCanvas('tennis', tennisImage);
  animateCanvas('jt', jtImage);
  animateCanvas('tbbt', seriesImage);
  $("#login-area .submit-button").click(function() {submitClick($(this));});
  setLogin();
  setLostPassword();
  setUserForms();
  setRegistration();
  setUsersBankAccount();
});

$(window).resize(function() {
  resizeCanvas();
});

createButton = function(name, callback) {
  var div = document.createElement("div");
    $(div).addClass("top");

  var div2 = document.createElement("div");
    $(div2).addClass("content");
    $(div2).text(name);

  var button = document.createElement("div");
    $(button).addClass("submit-button");
    $(button).append(div);
    $(button).append(div2);
    $(button).click(callback);

  return button;
}
